package cn.echogo.framework.homemenu;

import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.Scroller;
import android.widget.TextView;
import cn.echogo.framework.activity.EGFragment;
import cn.echogo.ipart.R;

public class MainMenuFragment extends EGFragment {
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		ScrollView sv = new ScrollView(getActivity());
		LinearLayout line = new LinearLayout(getActivity());
		line.setOrientation(LinearLayout.VERTICAL);
		line.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
		line.setBackgroundColor(Color.parseColor("#FF00FF"));
		sv.addView(line);
		
		for(int i = 0; i < 10; i ++ ) {
			TextView tv = new TextView(getActivity());
			tv.setText("abcababca");
			Button btn = new Button(getActivity());
			btn.setText("AAA");
			line.addView(tv);
			line.addView(btn);
		}
		
		return sv;
	}
	
}
